import {
    findUsers
} from "@/api/user";
import dayJs from "dayjs";

/***
 *  时间格式化方法
 */
export function Timeformatting(data) {
    const users = data.map((item) => {
        return Object.assign({}, item, {
            Idcard: "511xxxxxxxxxxxxxxxx234",
            state: ["待审核", "已驳回", "待服务"][Math.floor(Math.random() * 3)],
            service: ["老年人服务包", "0-6岁儿童服务包", "慢性病服务包"][
                Math.floor(Math.random() * 3)
            ],
            project: ["高血压随访", "心脏病检查", "胆固醇检查"][
                Math.floor(Math.random() * 3)
            ],
            createdAt: item.createdAt ? dayJs(item.createdAt).format("YYYY-MM-DD HH:MM") : "无"
        });
    });

    return users
}


